package com.example.jersey.config;

import com.example.jersey.service.ISomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;

/**
 * @author Mr.yuan
 * @version v1.0
 * @date 2020/1/2 10:32
 **/
@Component
@Path("resource")
public class SpringbootResource {

    @Autowired
    private ISomeService someService;

    @Path("sayhi")
    @GET
    public String sayHi(@QueryParam("msg") String msg) {
        this.someService.sayHi(msg);
        return "success";
    }
}
